package com.yuan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class StaticController {

    @RequestMapping("/testStaticResource")
    public String doStaticResource(){
        System.out.println(" 转发======= " );
        return "/html/index.html";		    //默认跳转路径方式:转发
        //return "forward:/html/index.html"
    }

    @RequestMapping("/doRedirectResource")
    public String doRedirectResource(){
        System.out.println(" 重定向======= " );
        return "redirect:/html/index.html";  //重定向
    }

}
